Open
Conversation
tdnf(1) formats outdated packages lines in an unexpected way where a
line like
```
sudo.x86_64 1.9.5-2.ph4 photon-updates
```
has this representation:
```
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 70 68 6f 74 6f 6e 2d 75 70 64 61 74 65 73 | photon-updates|
0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 2e | 1.|
39 2e 35 2d 32 2e 70 68 34 0d 73 75 64 6f 2e 78 |9.5-2.ph4.sudo.x|
38 36 5f 36 34 0a |86_64.|
```
while the code expect this:
```
73 75 64 6f 2e 78 38 36 5f 36 34 20 20 20 20 20 |sudo.x86_64 |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 20 20 20 31 2e 39 | 1.9|
2e 35 2d 32 2e 70 68 34 20 20 20 20 20 20 20 20 |.5-2.ph4 |
20 20 70 68 6f 74 6f 6e 2d 75 70 64 61 74 65 73 | photon-updates|
0a |.|
```
that is:
```
photon-updates<CR>
1.9.5-2.ph4<CR>
sudo.x86_64<LF>
```
Add an awk script that fix the output when it contains carriage returns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Photon OS is a RedHat derivative by VMWare targeting cloud environments.
This is currently WIP while I am working on this for a customer, but I open the PR now in order to gather feedback early.